package com.pt.pwmr;

import android.app.Presentation;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.view.Display;
import android.widget.TextView;

/**
 * Created by Winner on 2017/12/5.
 */

public class DemoPresentation extends Presentation {
    private GLSurfaceView surface_view;
    private TextView tv_dipaly_info;
    private Display display;

    public DemoPresentation(Context outerContext, Display display) {
        super(outerContext, display);
        this.display=display;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.presentation_content);
        surface_view=(GLSurfaceView) findViewById(R.id.surface_view_content);
        tv_dipaly_info=(TextView) findViewById(R.id.tv_display_info);
        //加载并渲染长方体模型
        surface_view.setRenderer(new CubeRenderer());
        tv_dipaly_info.setText("与prsentation相关联的屏幕是："+display.getName());
    }

    public GLSurfaceView getSurface_view() {
        return surface_view;
    }

}